import React,{Fragment} from 'react'
import Taro from '@tarojs/taro'
import { View, Text, Image,ScrollView } from '@tarojs/components'

function RightNavigation ({rightNavIgation}) {

  function goToHotCakes(){
    Taro.navigateTo({
      url:'../hotcakes/index'
    })
  }
  function goToIficationdetails(){
    Taro.navigateTo({
      url:'/pages/ification/ificationdetails/index'
    })
  }

  return (
      <Fragment>
        <View className='if_explosion' onClick={() => goToHotCakes()}>
          <View className='if_explosion_fl'>
              <Text className='one'>大家都在买</Text>
              <Text className='two'>本周</Text>
              <Text className='treen'>水果前20</Text>
          </View>
          <View className='if_explosion_fr'>
            <Image className='fr_imgone' src={require('../../../static/images/ceshi.png')}></Image>
            <Image className='fr_imgtwo' src={require('../../../static/images/ceshi.png')}></Image>
            <Image className='fr_imgtreen' src={require('../../../static/images/ceshi.png')}></Image>
          </View>
        </View>
        <ScrollView
          scrollY
          className='right_navigation'>
          {
            rightNavIgation.map((item,index) => {
              return (
                <View className='right_navigation_item' key={index} onClick={() => {goToIficationdetails()}}>
                  <Image className='navigation_imgs' src={item.rightUrl} />
                  <Text className='navigation_ms'>{item.rightText}</Text>
                </View>
              )
            })
          }
        </ScrollView>
      </Fragment>

    )
}

export default RightNavigation
